package com.jprocms.module.cms.controller.admin.channel.vo;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

@Schema(description = "管理后台 - 栏目列表 Response VO")
@Data
@ToString(callSuper = true)
public class ChannelListRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long id;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private Date createTime;

    @Schema(description = "栏目模型ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "栏目模型ID不能为空")
    private Long modelId;

    @Schema(description = "栏目模型名称")
    @NotNull(message = "栏目模型名称")
    private String modelName;

    /**
     * 内容模型ID
     */
    @Schema(description = "内容模型ID")
    private Long contentModelId;

    @Schema(description = "父栏目ID")
    private Long parentId;

    @Schema(description = "栏目名称")
    private String name;

    @Schema(description = "栏目名称 从父节点到自身")
    private List<String> nodeNames;

    @Schema(description = "访问路径", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "访问路径不能为空")
    private String path;

    @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "排序不能为空")
    private Integer sort;

    @Schema(description = "列表是否显示", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "列表是否显示不能为空")
    private Boolean listStatus;

    @Schema(description = "新闻列表是否普通分页", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "新闻列表是否普通分页不能为空")
    private Boolean listPage;

    @Schema(description = "分页大小", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "分页大小不能为空")
    private Integer pageSize;

    @Schema(description = "父节点到自身栏目名称")
    List<String> getNodeNames;

    @Schema(description = "父节点到自身栏目信息")
    public List<ChannelNodeVo> nodeList;

}
